<script>
import { ElPopover } from 'element-plus'
export default {
  name: 'Popover',
  props: {
    title: String,
    content: String
  },
  components: {
    ElPopover
  },
  setup(props, { slots }) {
    return () => {
      const content = props.content || slots.default() || '--'
      return (
        <el-popover
          placement="top-start"
          title={props.title}
          width={200}
          trigger="hover"
          content={content}
          v-slots={{
            reference: () => <span class="feedback-btn">{content}</span>
          }}
        ></el-popover>
      )
    }
  }
}
</script>
